package com.day2.test.t1;

public class Main {
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.age=100;
        s1.name="张三";
        s1.study();
    }
}
class Person{
    int age;
    String name;
    public void eat(){
        System.out.println("吃饭");
    }
}
class Student extends Person{
    public void study(){
        System.out.println(name+"学习");
    }
}
class Teacher extends Person{
    public void teach(){
        System.out.println("讲课");
    }
}

